var removeDuplicateLetters = function (s) {
  let res = []
  for (let i = 0; i < s.length; i++) {
    // 如果不包含
    if (!res.includes(s[i])) {
        res.push(s[i])
    }
  }
  return res
};

console.log(removeDuplicateLetters('bcabc'));